3.1.59 \(\int \cos ^4(a+b x) \sin ^2(a+b x) \, dx\) [59]

Optimal. Leaf size=67 \[ \frac {x}{16}+\frac {\cos (a+b x) \sin (a+b x)}{16 b}+\frac {\cos ^3(a+b x) \sin (a+b x)}{24 b}-\frac {\cos ^5(a+b x) \sin (a+b x)}{6 b} \]

[Out]

1/16*x+1/16*cos(b*x+a)*sin(b*x+a)/b+1/24*cos(b*x+a)^3*sin(b*x+a)/b-1/6*cos(b*x+a)^5*sin(b*x+a)/b

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2648, 2715, 8} \begin {gather*} -\frac {\sin (a+b x) \cos ^5(a+b x)}{6 b}+\frac {\sin (a+b x) \cos ^3(a+b x)}{24 b}+\frac {\sin (a+b x) \cos (a+b x)}{16 b}+\frac {x}{16} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]^4*Sin[a + b*x]^2,x]

[Out]

x/16 + (Cos[a + b*x]*Sin[a + b*x])/(16*b) + (Cos[a + b*x]^3*Sin[a + b*x])/(24*b) - (Cos[a + b*x]^5*Sin[a + b*x
])/(6*b)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2648

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(-a)*(b*Cos[e
 + f*x])^(n + 1)*((a*Sin[e + f*x])^(m - 1)/(b*f*(m + n))), x] + Dist[a^2*((m - 1)/(m + n)), Int[(b*Cos[e + f*x
])^n*(a*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, n}, x] && GtQ[m, 1] && NeQ[m + n, 0] && IntegersQ[
2*m, 2*n]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rubi steps

\begin {align*} \int \cos ^4(a+b x) \sin ^2(a+b x) \, dx &=-\frac {\cos ^5(a+b x) \sin (a+b x)}{6 b}+\frac {1}{6} \int \cos ^4(a+b x) \, dx\\ &=\frac {\cos ^3(a+b x) \sin (a+b x)}{24 b}-\frac {\cos ^5(a+b x) \sin (a+b x)}{6 b}+\frac {1}{8} \int \cos ^2(a+b x) \, dx\\ &=\frac {\cos (a+b x) \sin (a+b x)}{16 b}+\frac {\cos ^3(a+b x) \sin (a+b x)}{24 b}-\frac {\cos ^5(a+b x) \sin (a+b x)}{6 b}+\frac {\int 1 \, dx}{16}\\ &=\frac {x}{16}+\frac {\cos (a+b x) \sin (a+b x)}{16 b}+\frac {\cos ^3(a+b x) \sin (a+b x)}{24 b}-\frac {\cos ^5(a+b x) \sin (a+b x)}{6 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 40, normalized size = 0.60 \begin {gather*} -\frac {-12 b x-3 \sin (2 (a+b x))+3 \sin (4 (a+b x))+\sin (6 (a+b x))}{192 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x]^4*Sin[a + b*x]^2,x]

[Out]

-1/192*(-12*b*x - 3*Sin[2*(a + b*x)] + 3*Sin[4*(a + b*x)] + Sin[6*(a + b*x)])/b

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 54, normalized size = 0.81

method result size
risch \(\frac {x}{16}-\frac {\sin \left (6 b x +6 a \right )}{192 b}-\frac {\sin \left (4 b x +4 a \right )}{64 b}+\frac {\sin \left (2 b x +2 a \right )}{64 b}\) \(47\)
derivativedivides \(\frac {-\frac {\left (\cos ^{5}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{6}+\frac {\left (\cos ^{3}\left (b x +a \right )+\frac {3 \cos \left (b x +a \right )}{2}\right ) \sin \left (b x +a \right )}{24}+\frac {b x}{16}+\frac {a}{16}}{b}\) \(54\)
default \(\frac {-\frac {\left (\cos ^{5}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{6}+\frac {\left (\cos ^{3}\left (b x +a \right )+\frac {3 \cos \left (b x +a \right )}{2}\right ) \sin \left (b x +a \right )}{24}+\frac {b x}{16}+\frac {a}{16}}{b}\) \(54\)
norman \(\frac {\frac {x}{16}-\frac {\tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{8 b}+\frac {47 \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{24 b}-\frac {13 \left (\tan ^{5}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4 b}+\frac {13 \left (\tan ^{7}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4 b}-\frac {47 \left (\tan ^{9}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{24 b}+\frac {\tan ^{11}\left (\frac {b x}{2}+\frac {a}{2}\right )}{8 b}+\frac {3 x \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8}+\frac {15 x \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{16}+\frac {5 x \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{4}+\frac {15 x \left (\tan ^{8}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{16}+\frac {3 x \left (\tan ^{10}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8}+\frac {x \left (\tan ^{12}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{16}}{\left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )^{6}}\) \(199\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)^4*sin(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/b*(-1/6*cos(b*x+a)^5*sin(b*x+a)+1/24*(cos(b*x+a)^3+3/2*cos(b*x+a))*sin(b*x+a)+1/16*b*x+1/16*a)

________________________________________________________________________________________

Maxima [A]
time = 0.34, size = 37, normalized size = 0.55 \begin {gather*} \frac {4 \, \sin \left (2 \, b x + 2 \, a\right )^{3} + 12 \, b x + 12 \, a - 3 \, \sin \left (4 \, b x + 4 \, a\right )}{192 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4*sin(b*x+a)^2,x, algorithm="maxima")

[Out]

1/192*(4*sin(2*b*x + 2*a)^3 + 12*b*x + 12*a - 3*sin(4*b*x + 4*a))/b

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 47, normalized size = 0.70 \begin {gather*} \frac {3 \, b x - {\left (8 \, \cos \left (b x + a\right )^{5} - 2 \, \cos \left (b x + a\right )^{3} - 3 \, \cos \left (b x + a\right )\right )} \sin \left (b x + a\right )}{48 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4*sin(b*x+a)^2,x, algorithm="fricas")

[Out]

1/48*(3*b*x - (8*cos(b*x + a)^5 - 2*cos(b*x + a)^3 - 3*cos(b*x + a))*sin(b*x + a))/b

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 136 vs. \(2 (56) = 112\).
time = 0.40, size = 136, normalized size = 2.03 \begin {gather*} \begin {cases} \frac {x \sin ^{6}{\left (a + b x \right )}}{16} + \frac {3 x \sin ^{4}{\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{16} + \frac {3 x \sin ^{2}{\left (a + b x \right )} \cos ^{4}{\left (a + b x \right )}}{16} + \frac {x \cos ^{6}{\left (a + b x \right )}}{16} + \frac {\sin ^{5}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{16 b} + \frac {\sin ^{3}{\left (a + b x \right )} \cos ^{3}{\left (a + b x \right )}}{6 b} - \frac {\sin {\left (a + b x \right )} \cos ^{5}{\left (a + b x \right )}}{16 b} & \text {for}\: b \neq 0 \\x \sin ^{2}{\left (a \right )} \cos ^{4}{\left (a \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)**4*sin(b*x+a)**2,x)

[Out]

Piecewise((x*sin(a + b*x)**6/16 + 3*x*sin(a + b*x)**4*cos(a + b*x)**2/16 + 3*x*sin(a + b*x)**2*cos(a + b*x)**4
/16 + x*cos(a + b*x)**6/16 + sin(a + b*x)**5*cos(a + b*x)/(16*b) + sin(a + b*x)**3*cos(a + b*x)**3/(6*b) - sin
(a + b*x)*cos(a + b*x)**5/(16*b), Ne(b, 0)), (x*sin(a)**2*cos(a)**4, True))

________________________________________________________________________________________

Giac [A]
time = 6.04, size = 46, normalized size = 0.69 \begin {gather*} \frac {1}{16} \, x - \frac {\sin \left (6 \, b x + 6 \, a\right )}{192 \, b} - \frac {\sin \left (4 \, b x + 4 \, a\right )}{64 \, b} + \frac {\sin \left (2 \, b x + 2 \, a\right )}{64 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4*sin(b*x+a)^2,x, algorithm="giac")

[Out]

1/16*x - 1/192*sin(6*b*x + 6*a)/b - 1/64*sin(4*b*x + 4*a)/b + 1/64*sin(2*b*x + 2*a)/b

________________________________________________________________________________________

Mupad [B]
time = 0.56, size = 43, normalized size = 0.64 \begin {gather*} \frac {x}{16}-\frac {\frac {\sin \left (4\,a+4\,b\,x\right )}{64}-\frac {\sin \left (2\,a+2\,b\,x\right )}{64}+\frac {\sin \left (6\,a+6\,b\,x\right )}{192}}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x)^4*sin(a + b*x)^2,x)

[Out]

x/16 - (sin(4*a + 4*b*x)/64 - sin(2*a + 2*b*x)/64 + sin(6*a + 6*b*x)/192)/b

________________________________________________________________________________________